<template>
    <div>
        <h1>First组件</h1>
        <input type="text" v-model="msg">
        <button @click="sendMsgToBrother">发送</button>
    </div>
</template>

<script>
import pubsub from 'pubsub-js'
export default {
    data(){
        return{
            msg:''
        }
    },
    methods:{
        sendMsgToBrother(){
          pubsub.publish('gileskey',this.msg)
        }
    }
}
</script>

<style>

</style>